home *** CD-ROM | disk | FTP | other *** search
- -- E3Greeter Behaviour SCRIPT
- --------------------------
-
- AIBehaviour.E3Greeter = {
- Name = "E3Greeter",
- pathname = "",
-
- State = 0,
- Greeted = 0,
-
- Sounds = {
- hey = Sound:Load3DSound("Sounds/e3ai/hey.wav"),
- wait = Sound:Load3DSound("Sounds/e3ai/wait.wav"),
- },
-
-
- OnSpawn = function(self,entity )
-
- AI:CreateGoalPipe(entity:GetName().."walk");
- AI:PushGoal(entity:GetName().."walk","bodypos",0,0);
- AI:PushGoal(entity:GetName().."walk","run",0,0);
- AI:PushGoal(entity:GetName().."walk","pathfind",1,entity.Properties.pathname);
- AI:PushGoal(entity:GetName().."walk","trace",1,1);
-
-
- -- copy this line to OnActivate if you want to activate this guy with a
- -- proximity trigger
- ---------
- end,
- --------------------------------------------------------------------------------------------
- OnActivate = function(self,entity )
-
- -- if you want the guy to start moving along path after he hit a activation
- -- proximity trigger, just copy the last line of OnSpawn here
- entity:SelectPipe(0,entity:GetName().."walk");
- end,
- ---------------------------------------------
- OnPlayerSeen = function( self,entity )
-
- if (entity.Behaviour.Greeted == 0) then
- entity:SelectPipe(0,"misunderstood");
- entity.Behaviour.Greeted = 1;
- end
- end,
- ---------------------------------------------
- OnEnemyMemory = function(self,entity )
-
- end,
- ---------------------------------------------
- OnReceivingDamage = function (self,entity, sender)
- System:Log(entity:GetName().." (DEFAULT) AIEVENT - OnReceivingDamage");
-
- entity:StartAnimation(0,"spain_stun");
- entity:SelectPipe(0,"standfire");
-
- if (entity.Behaviour.State == 0) then
- entity:SelectPipe(0,"fumbleforweapon");
- else
- entity:SelectPipe(0,"inpaincycle");
- end
-
- end,
- ---------------------------------------------
- OnInterestingSoundHeard = function(self,entity )
- end,
- ---------------------------------------------
- OnThreateningSoundHeard = function( self,entity )
- end,
- ---------------------------------------------
-
-
-
-
- -- CUSTOM SIGNALS
- -----------------------------------------------------------------
- PlayFumbleAnimation = function( self,entity )
- entity:StartAnimation(0,"sreload");
- end,
- -----------------------------------------------------------------
- NowStandAndFire = function(self, entity )
-
- entity:SelectPipe(0,"standfire");
- end,
- -----------------------------------------------------------------
- GreetAndSayNiceToMeetYou = function(self, entity )
- entity:StartAnimation(0,"ssignal_sgreet");
-
- -- #Steve: Play sound here: "Hey, am I glad to see you guys"
- entity:Say(entity.Behaviour.Sounds.hey);
- System:LogToConsole("Hey, am I glad to see you guys");
- end,
- -----------------------------------------------------------------
- OhShitItsTheSkipper = function(self, entity )
- entity:StartAnimation(0,"ssurprise");
-
- -- #Steve: Play sound here: "Hold on a secà shit"
- entity:Say(entity.Behaviour.Sounds.wait);
- System:LogToConsole("Hold on a secà shit");
- end,
- -----------------------------------------------------------------
- GetYourWeaponOut = function(self, entity )
- entity:SelectPipe(0,"fumbleforweapon");
- -- #Steve: Play sound here: some grunting sound
- end,
- -----------------------------------------------------------------
- WeaponDrawn = function(self, entity )
- entity.Behaviour.State = 1;
- if (entity.Behaviour.LOS == 1) then
- entity:StartAnimation(0,"sidleaim_loop");
- entity:SelectPipe(0,"standfire");
- end
- end,
-
-
-
- }